// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CommentHistory.cs" company="ecblog.codeplex.com">
//   emrecoskun.net - ibrahimatay.com
// </copyright>
// <summary>
//   The commet history
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace EcBlog.Models
{
    using System;
    using System.ComponentModel.DataAnnotations;
    
    // using System.ComponentModel.DataAnnotations.Schema;

    /// <summary>
    /// The commet history
    /// </summary>
    public class CommentHistory 
    {
        /// <summary>
        /// Gets or sets the comment history id.
        /// </summary>
        /// <value>
        /// The comment history id.
        /// </value>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long CommentHistoryId { get; set; }

        /// <summary>
        /// Gets or sets the comment id.
        /// </summary>
        /// <value>
        /// The comment id.
        /// </value>
        public long CommentId { get; set; }

        /// <summary>
        /// Gets or sets the name of the user.
        /// </summary>
        /// <value>
        /// The name of the user.
        /// </value>
        [Required, StringLength(20)]
        public string UserName { get; set; }

        /// <summary>
        /// Gets or sets the email.
        /// </summary>
        /// <value>
        /// The email.
        /// </value>
        [Required, StringLength(50)]
        public string Email { get; set; }

        /// <summary>
        /// Gets or sets the web.
        /// </summary>
        /// <value>
        /// The web.
        /// </value>
        [StringLength(50)]
        public string Web { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [send response mail].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [send response mail]; otherwise, <c>false</c>.
        /// </value>
        public bool SendResponseMail { get; set; }

        /// <summary>
        /// Gets or sets the comment HTML.
        /// </summary>
        /// <value>
        /// The comment HTML.
        /// </value>
        [Required][StringLength(4000)]
        public string CommentHtml { get; set; }

        /// <summary>
        /// Gets or sets the page id.
        /// </summary>
        /// <value>
        /// The page id.
        /// </value>
        public long PageId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is published.
        /// </summary>
        /// <value>
        ///      <c>true</c> if this instance is published; otherwise, <c>false</c>.
        /// </value>
        public bool IsPublished { get; set; }

        /// <summary>
        /// Gets or sets the created.
        /// </summary>
        /// <value>
        /// The created.
        /// </value>
        [Editable(false)][ScaffoldColumn(false)]
        public DateTime Created { get; set; }

        /// <summary>
        /// Gets or sets the last modified.
        /// </summary>
        /// <value>
        /// The last modified.
        /// </value>
        public DateTime LastModified { get; set; }

        /// <summary>
        /// Gets or sets the last modified user.
        /// </summary>
        /// <value>
        /// The last modified user.
        /// </value>
        [StringLength(50)]
        public string LastModifiedUser { get; set; }

        /// <summary>
        /// Gets or sets the operation.
        /// </summary>
        /// <value>
        /// The operation.
        /// </value>
        public CrudOperation Operation { get; set; }
    }
}